package com.NewCoder.Commity.dao;

import com.NewCoder.Commity.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

@Mapper
public interface UserMapper {

    //根据id查用户
    User selectById(int id);
    //根据name查用户
    User selectByName(String username);
    //根据email查用户
    User selectByEmail(String email);

    //插入用户
    int insertUser(User user);
    //修改用户的状态
    int updateStatus(int id, int status);

    //更新头像的路径
    int updateUrl(int id, String headerUrl);
    //修改密码
    int updatePassword(int id, String password);

}
